<%@ page language="java" import="java.util.Vector,com.scn.base.page.TreeNode" pageEncoding="UTF-8"%>
<%@ taglib uri="/tags/app" prefix="app"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<HTML>
<HEAD>
    <TITLE>菜单设置</TITLE>
    <META content="MSHTML 6.00.2800.1276" name=GENERATOR>
    <META http-equiv=Content-Type content="text/html; charset=gbk">
    <META http-equiv=Content-Style-Type content=text/css>
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta name="viewport" content="width=device-width,minimum-scale=1.0"/>
<SCRIPT language=JavaScript 
src="<app:ContextPath/>/gxjs/style1/<app:MenuView role="${sessionScope.userinfo.userrole}"/>"></SCRIPT>

<script language="javascript" src="/htoa/js/1315.js"></script>
<script language="javascript" src="/htoa/js/1313.js"></script>

<script language="javascript" src="<app:ContextPath/>/gxjs/style1/stm31.js"></script>
<script language="javascript" src="<app:ContextPath/>/gxjs/style1/systemMsg.js"></script>
<script language="javascript" src="<app:ContextPath/>/gxjs/style1/pageCommon.js"></script>
<script language="javascript" src="<app:ContextPath/>/gxjs/style1/general.js"></script>
<script language="javascript"
			src="<app:ContextPath/>/dwr/interface/MenuService.js"></script>
		<script language="javascript"
			src="<app:ContextPath/>/dwr/util.js"></script>
		<script language="javascript"
			src="<app:ContextPath/>/dwr/engine.js"></script>
	<script type="text/javascript">
		function checkName(){
			MenuService.checkMenuName(document.getElementById("smname").value,checkNameCallback);
		}
		function checkNameCallback(data){
			if(data=="1"){
				document.getElementById("nameerror").innerHTML="此菜单名已存在！请重新输入";
				return false;
			}else if(data=="2"){
				document.getElementById("nameerror").innerHTML="菜单名不能为空！请输入";
				return false;
			}
			document.getElementById("nameerror").innerHTML="";
			return true;
		}
		function saveMenu(){
			MenuService.checkMenuName(document.getElementById("smname").value,saveMenuCallback);
		}
		function saveMenuCallback(data){
			if(data=="1"){
				alert("此菜单名已存在！请重新输入");
				return;
			}else if(data=="2"){
				alert("菜单名不能为空！请输入");
				return;
			}
			document.getElementById("nameerror").innerHTML="";
			document.getElementById("menuForm").submit();
		}
		
		function menuOption(){
			MenuService.selectParentMenuForOption(menuOptionCallback);
		}
		function menuOptionCallback(data){
		    var str="<select  class='SelectStyle' id='parentSelect' name='smpid'><option value='1'>无上级</option>";
		    
			for(var i=0;i<data.length;i++)
			{
			   str += data[i];
			}
			str+="</select>";	
			document.getElementById("selectMenu").innerHTML=str;
		}
		
		</script>
<LINK href="<app:ContextPath/>/gxcss/style1/mainWin1.css" type=text/css  media=screen rel=stylesheet>
<LINK href="<app:ContextPath/>/gxcss/style1/02.css" type=text/css  media=screen rel=stylesheet>
<LINK href="<app:ContextPath/>/gxcss/style1/mainWin2.css" type=text/css  media=screen rel=stylesheet>

	
    <base target="_self">
</HEAD>
<body marginwidth="0" topmargin="0" leftmargin="0"  marginheight="0">

		<DIV ID=Title_bar>
			<DIV ID=Title_bar_Head>
				<DIV ID=Title_Head></DIV>
				<DIV ID=Title>
					<img border="0" width="13" height="13" src="<app:ContextPath/>/gximages/style1/title_arrow.gif" />
					菜单设置
				</DIV>
				<DIV ID=Title_End></DIV>
				<DIV ID=Title_bar_bg></DIV>
			</DIV>
			
			<DIV ID=Title_bar_Tail>
				<DIV ID=Title_FuncBar>
					<UL>
						
						
							<LI CLASS=line></LI>
							<LI CLASS=title><a name="BTN3926646395358TH" href="<app:ContextPath/>/menuListAll.html">
    <div class="Btn">
        返回
    </div></a>

</LI>
						
						<LI CLASS=line></LI>
						<LI CLASS=title>
    <div onclick="saveMenu()" class="Btn">
        保存
    </div>

</LI>
						<LI CLASS=line></LI>
					</UL>
				</DIV>
			</DIV>
		</DIV>
		<DIV ID=MainArea>
			<div id="PageHead"></div><a name="downloadLnk" href="/OAapp/WebObjects/OAapp.woa/wo/com.oa8000.proj.oasp12.Oasp1313/6DphZ1NRBtPLeMmAVSmnqg/140.0.11.0.1.13.1"></a>
			<CENTER>
			<form method="post" id="menuForm" action="<app:ContextPath/>/addMenu.html">
				<DIV CLASS=ItemBlock_Title1>
				</DIV>
				<DIV CLASS=ItemBlockBorder>
					<DIV CLASS=ItemBlock>
						<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
							<TR HEIGHT=30>
								<TD WIDTH=60></TD>
								<TD WIDTH=80>菜单名称</TD>
								<TD WIDTH=300 nowrap="nowrap"><input onblur="checkName(this);" onfocus="this.select();" class="InputStyle" type="text" name="smname" id="smname"/><font color="red">*</font></TD>
							</TR>
							<TR HEIGHT=30>
								<TD WIDTH=60></TD>
								<TD WIDTH=80>上级菜单</TD>
								<TD WIDTH=300 id="selectMenu">
								
								</TD>
							</TR>
							</select><script language="javascript">
								menuOption();
								</script>
							<TR id=fileTr_img  style="visibility:visible;">
								<TD></TD>
								<TD>菜单图片</TD>
								<TD>
									<TABLE CELLPADDING=0 BORDER=0 CELLSPACING=0>
										<TR>
											
												<TD WIDTH=50 STYLE="border-bottom:0 solid #ffffff">
													<input  type="radio" value="1" name="smimg" />
													<img src="<app:ContextPath/>/gximages/style1/menu_ico/FUNC1.gif" />
												</TD>
											
												<TD WIDTH=50 STYLE="border-bottom:0 solid #ffffff">
													<input  type="radio" value="2" name="smimg" />
													<img src="<app:ContextPath/>/gximages/style1/menu_ico/FUNC2.gif" />
												</TD>
											
												<TD WIDTH=50 STYLE="border-bottom:0 solid #ffffff">
													<input  type="radio" value="3" name="smimg" />
													<img src="<app:ContextPath/>/gximages/style1/menu_ico/FUNC3.gif" />
												</TD>
											
												<TD WIDTH=50 STYLE="border-bottom:0 solid #ffffff">
													<input  type="radio" value="4" name="smimg" />
													<img src="<app:ContextPath/>/gximages/style1/menu_ico/FUNC4.gif" />
												</TD>
											
												<TD WIDTH=50 STYLE="border-bottom:0 solid #ffffff">
													<input  type="radio" value="5" name="smimg" />
													<img src="<app:ContextPath/>/gximages/style1/menu_ico/FUNC5.gif" />
												</TD>
											
												<TD WIDTH=50 STYLE="border-bottom:0 solid #ffffff">
													<input  type="radio" value="6" name="smimg" />
													<img src="<app:ContextPath/>/gximages/style1/menu_ico/FUNC6.gif" />
												</TD>
											
												<TD WIDTH=50 STYLE="border-bottom:0 solid #ffffff">
													<input  type="radio" value="7" name="smimg" />
													<img src="<app:ContextPath/>/gximages/style1/menu_ico/FUNC7.gif" />
												</TD>
											
										</TR>
										<TR>
											
												<TD WIDTH=50 STYLE="border-bottom:0 solid #ffffff">
													<input  type="radio" value="8" name="smimg" />
													<img src="<app:ContextPath/>/gximages/style1/menu_ico/FUNC8.gif" />
												</TD>
											
												<TD WIDTH=50 STYLE="border-bottom:0 solid #ffffff">
													<input  type="radio" value="9" name="smimg" />
													<img src="<app:ContextPath/>/gximages/style1/menu_ico/FUNC9.gif" />
												</TD>
											
												<TD WIDTH=50 STYLE="border-bottom:0 solid #ffffff">
													<input  type="radio" value="10" name="smimg" />
													<img src="<app:ContextPath/>/gximages/style1/menu_ico/FUNC10.gif" />
												</TD>
											
												<TD WIDTH=50 STYLE="border-bottom:0 solid #ffffff">
													<input  type="radio" value="11" name="smimg" />
													<img src="<app:ContextPath/>/gximages/style1/menu_ico/FUNC11.gif" />
												</TD>
											
												<TD WIDTH=50 STYLE="border-bottom:0 solid #ffffff">
													<input  type="radio" value="12" name="smimg" />
													<img src="<app:ContextPath/>/gximages/style1/menu_ico/FUNC12.gif" />
												</TD>
											
												<TD WIDTH=50 STYLE="border-bottom:0 solid #ffffff">
													<input  type="radio" value="13" name="smimg" />
													<img src="<app:ContextPath/>/gximages/style1/menu_ico/FUNC13.gif" />
												</TD>
											
												<TD WIDTH=50 STYLE="border-bottom:0 solid #ffffff">
													<input type="radio" value="14" name="smimg" />
													<img src="<app:ContextPath/>/gximages/style1/menu_ico/FUNC14.gif" />
												</TD>
											
										</TR>
									</TABLE>
								</TD>
							</TR>
								<TR HEIGHT=30>
									<TD></TD>
									<TD CLASS=ItemTitleFont>链接目标</TD>
									<TD>
											<input onfocus="this.select();" maxlength="100" class="InputStyle" style="width: 300px;" type="text" value="http://" name="smurl" />
									</TD>
								</TR>
							
							
								
									<TR HEIGHT=30>
										<TD></TD>
										<TD CLASS=ItemTitleFont>&nbsp;</TD>
										<TD>
											<input type="checkbox" value="1" name="smview" checked/>
											是否有效
											<input type="checkbox" value="1" name="smpomp" />
											是否为弹出窗口
											
										</TD>
									</TR>
						</TABLE>
					</DIV>
				</DIV>
				<DIV ID=InputDetailBar>
					<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=10 ALIGN=center>
						<TR>
							<TD>

<div  class="FuncBtn"><div class=FuncBtnHead></div>
        <div class=FuncBtnMemo onclick="saveMenu()">保存</div>
        <div class=FuncBtnTail></div></div></TD>
							
								<TD><a name="BTN39266463968478R" href="<app:ContextPath/>/menuListAll.html">

	<div class="FuncBtn"><div class=FuncBtnHead></div>
        <div class=FuncBtnMemo>返回</div>
        <div class=FuncBtnTail></div></div></a></TD>
							
							
						</TR>
					</TABLE>
				</DIV>
				</form>
			</CENTER>
		</DIV>
		
</body>
<app:Alert/>
</HTML>